import Vue from 'vue'

let routes = [
  {
    path: '/home',
    name: '登录页',
    component: resolve => require(['@/components/Home'], resolve)
  },
  //---------导航栏路由路径-----------------
  {
    path: '/manage_system/',
    name: '系统管理',
    icon: "el-icon-menu",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/sys_role',
      name: '角色管理',
      icon: "el-icon-menu",
      component: resolve => require(['@/components/mainpage/Commons/system/sys_role'], resolve),
    },{
      path: '/manage_system/sys_user',
      name: '用户管理',
      icon: "el-icon-location",
      component: resolve => require(['@/components/mainpage/Commons/system/sys_user'], resolve),
    }]
  },
  {
    path: '/manage_system/',
    name: '用户管理',
    icon: "el-icon-user",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/user_info',
      name: '用户信息',
      component: resolve => require(['@/components/mainpage/Commons/user/user_info'], resolve),
    },{
      path: '/manage_system/user_address_list',
      name: '收货地址',
      component: resolve => require(['@/components/mainpage/Commons/user/user_address_list'], resolve),
    },{
      path: '/manage_system/user_point_records',
      name: '积分记录',
      component: resolve => require(['@/components/mainpage/Commons/user/user_point_records'], resolve),
    },{
      path: '/manage_system/user_balance_records',
      name: '余额记录',
      component: resolve => require(['@/components/mainpage/Commons/user/user_balance_records'], resolve),
    },{
      path: '/manage_system/user_benefits_records',
      name: '收益记录',
      component: resolve => require(['@/components/mainpage/Commons/user/user_benefits_records'], resolve),
    },{
      path: '/manage_system/user_coin_records',
      name: '平台币记录',
      component: resolve => require(['@/components/mainpage/Commons/user/user_coin_records'], resolve),
    },{
      path: '/manage_system/user_bankcard_list',
      name: '银行卡',
      component: resolve => require(['@/components/mainpage/Commons/user/user_bankcard_list'], resolve),
    },{
      path: '/manage_system/user_authentication_rercords',
      name: '实名认证',
      component: resolve => require(['@/components/mainpage/Commons/user/user_authentication_rercords'], resolve),
    },{
      path: '/manage_system/user_relationship',
      name: '用户关系',
      component: resolve => require(['@/components/mainpage/Commons/user/user_relationship'], resolve),
    }]
  },
  {
    path: '/manage_system/',
    name: '优惠券管理',
    icon: "el-icon-star-off",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/coupon_list',
      name: '优惠券',
      icon: "el-icon-menu",
      component: resolve => require(['@/components/mainpage/Commons/coupon/coupon_list'], resolve),
    },{
      path: '/manage_system/coupon_records',
      name: '用户优惠券',
      component: resolve => require(['@/components/mainpage/Commons/coupon/coupon_records'], resolve)
    }]
  },
  {
    path: '/manage_system/',
    name: '商品管理',
    icon: "el-icon-goods",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/goods_category_list',
      name: '商品分类',
      component: resolve => require(['@/components/mainpage/Commons/goods/goods_category_list'], resolve),
    },{
      path: '/manage_system/goods_brand_list',
      name: '商品品牌',
      component: resolve => require(['@/components/mainpage/Commons/goods/goods_brand_list'], resolve),
    },{
      path: '/manage_system/goods_prop_list',
      name: '商品属性',
      component: resolve => require(['@/components/mainpage/Commons/goods/goods_prop_list'], resolve),
    },{
      path: '/manage_system/goods_prop_value_list',
      name: '商品属性值',
      component: resolve => require(['@/components/mainpage/Commons/goods/goods_prop_value_list'], resolve),
    },{
      path: '/manage_system/goods_prop_set_list',
      name: '商品属性配置',
      component: resolve => require(['@/components/mainpage/Commons/goods/goods_prop_set_list'], resolve),
    },{
      path: '/manage_system/goods_sku_config',
      name: '商品SKU',
      component: resolve => require(['@/components/mainpage/Commons/goods/goods_sku_config'], resolve),
    },{
      path: '/manage_system/goods_list',
      name: '商品信息',
      component: resolve => require(['@/components/mainpage/Commons/goods/goods_list'], resolve),
    },{
      path: '/manage_system/group_buy_goods',
      name: '拼团记录',
      component: resolve => require(['@/components/mainpage/Commons/goods/group_buy_goods'], resolve),
    },{
      path: '/manage_system/hot_sales_goods',
      name: '今日热销',
      component: resolve => require(['@/components/mainpage/Commons/goods/hot_sales_goods'], resolve),
    },{
      path: '/manage_system/limited_goods',
      name: '限购商品',
      component: resolve => require(['@/components/mainpage/Commons/goods/limited_goods'], resolve),
    },{
      path: '/manage_system/new_goods',
      name: '新品上市',
      component: resolve => require(['@/components/mainpage/Commons/goods/new_goods'], resolve),
    },{
      path: '/manage_system/recommend_goods',
      name: '超级推荐',
      component: resolve => require(['@/components/mainpage/Commons/goods/recommend_goods'], resolve),
    },{
      path: '/manage_system/activity_goods',
      name: '活动商品',
      component: resolve => require(['@/components/mainpage/Commons/goods/activity_goods'], resolve),
    },{
      path: '/manage_system/top_rank_goods',
      name: '热卖TOP',
      component: resolve => require(['@/components/mainpage/Commons/goods/top_rank_goods'], resolve),
    },{
      path: '/manage_system/goods_comment_list',
      name: '商品评价',
      component: resolve => require(['@/components/mainpage/Commons/goods/goods_comment_list'], resolve),
    },{
      path: '/manage_system/user_share_records',
      name: '商品分享记录',
      component: resolve => require(['@/components/mainpage/Commons/goods/user_share_records'], resolve),
    }]
  },
  {
    path: '/manage_system/',
    name: '购物车管理',
    icon: "el-icon-shopping-cart-full",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/user_shopping_cart_list',
      name: '购物车记录',
      icon: "el-icon-menu",
      component: resolve => require(['@/components/mainpage/Commons/shopping_cart/user_shopping_cart_list'], resolve),
    }]
  },
  {
    path: '/manage_system/',
    name: '广告管理',
    icon: "el-icon-news",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/ad_positon_list',
      name: '广告位',
      icon: "el-icon-menu",
      component: resolve => require(['@/components/mainpage/Commons/ad/ad_positon_list'], resolve),
    },{
      path: '/manage_system/ad_list',
      name: '广告内容',
      component: resolve => require(['@/components/mainpage/Commons/ad/ad_list'], resolve)
    }]
  },
  {
    path: '/manage_system/',
    name: '订单管理',
    icon: "el-icon-document",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/order_goods_list',
      name: '商品订单信息',
      icon: "el-icon-menu",
      component: resolve => require(['@/components/mainpage/Commons/order/order_goods_list'], resolve),
    },{
      path: '/manage_system/user_order_recharge',
      name: '充值订单',
      component: resolve => require(['@/components/mainpage/Commons/order/user_order_recharge'], resolve)
    },{
      path: '/manage_system/user_order_withdraw',
      name: '提现订单',
      component: resolve => require(['@/components/mainpage/Commons/order/user_order_withdraw'], resolve)
    }]
  },
  {
    path: '/manage_system/',
    name: '会员管理',
    icon: "el-icon-coordinate",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/vip_price',
      name: '会员价格',
      icon: "el-icon-menu",
      component: resolve => require(['@/components/mainpage/Commons/vip/vip_price'], resolve),
    },{
      path: '/manage_system/vip_privilege',
      name: '会员特权',
      component: resolve => require(['@/components/mainpage/Commons/vip/vip_privilege'], resolve)
    }]
  },
  {
    path: '/manage_system/',
    name: '消息管理',
    icon: "el-icon-message",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/msg_system',
      name: '系统消息',
      component: resolve => require(['@/components/mainpage/Commons/msg/msg_system'], resolve),
    },{
      path: '/manage_system/msg_notification',
      name: '通知消息',
      component: resolve => require(['@/components/mainpage/Commons/msg/msg_notification'], resolve),
    }]
  },
  {
    path: '/manage_system/',
    name: '配置管理',
    icon: "el-icon-setting",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/sys_config',
      name: '系统配置',
      icon: "el-icon-menu",
      component: resolve => require(['@/components/mainpage/Commons/config/sys_config'], resolve),
    }]
  },
  {
    path: '/manage_system/',
    name: '统计管理',
    icon: "el-icon-setting",
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    root: true,
    children: [{
      path: '/manage_system/statsInfo',
      name: '统计信息',
      icon: "el-icon-menu",
      component: resolve => require(['@/components/mainpage/Commons/stats/statsInfo'], resolve),
    }]
  },

  //不进入菜单的组件
  {
    path: '/manage_system/',
    name: '其它',
    component: resolve => require(['@/components/mainpage/CompanyHome'], resolve),
    hide: true,
    root: false,
    children: [
      // {
        // path: '/manage_system/message',
        // name: '更多信息',
        // component: resolve => require(['@/components/mainpage/Commons/device/message'], resolve),
      // },
      // {
        // path: '/manage_system/templateData',
        // name: '数据点',
        // component: resolve => require(['@/components/mainpage/Commons/product/templateData'], resolve),
      // }
    ]
  },
  {
    path: '/404',
    name: '404',
    component: resolve => require(['@/components/mainpage/Commons/notFound'], resolve),
  }
]

export default routes
